package com.yonyou.crm.cum.terminalpoint.rmimpl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yonyou.crm.common.page.entity.Page;
import com.yonyou.crm.cum.terminalpoint.entity.CumChnlnodeVO;
import com.yonyou.crm.cum.terminalpoint.rmitf.ICumChnlnodeRmService;
import com.yonyou.crm.cum.terminalpoint.service.CumChnlnodeBizServiceImpl;

@Service("cumChnlnodeService")
public class CumChnlnodeRmServiceImpl implements ICumChnlnodeRmService {
	
	@Autowired
	private CumChnlnodeBizServiceImpl bizService;
	
	@Override
	public Page<CumChnlnodeVO> getPage(Page<CumChnlnodeVO> page,
			Map<String, Object> paramMap) {
		return bizService.getPage(page, paramMap);
	}

	@Override
	public CumChnlnodeVO save(CumChnlnodeVO cumChnlnode) {
		bizService.save(cumChnlnode);
		bizService.detail(cumChnlnode.getId());
		//返回新增信息
		return bizService.detail(cumChnlnode.getId());
	}

	@Override
	public Page<CumChnlnodeVO> deleteCumChnlnodeByIDs(String[] ids,
			Map<String, Object> paramMap) {
		bizService.batchDeleteCumChnlnodeByIDs(ids);
		//返回删除后的列表信息
		Page<CumChnlnodeVO> baseDocPage = bizService.getPage(new Page<CumChnlnodeVO>(0, 0), paramMap);
		return baseDocPage;
	}

	@Override
	public CumChnlnodeVO update(CumChnlnodeVO cumChnlnode) {
		bizService.update(cumChnlnode);
		bizService.detail(cumChnlnode.getId());
		//返回修改后信息
		return bizService.detail(cumChnlnode.getId());
	}

	@Override
	public CumChnlnodeVO detail(Long id) {
		return bizService.detail(id);
	}

}
